package cn.school.controller.student;

import cn.school.common.api.CommonResult;
import cn.school.student.service.StudentLeaveReportService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: 学生销假Controller
 * @ClassName: StudentReportController
 * @Author: tzw
 * @Date: 2024/3/28 7:55
 */
@RestController
@RequestMapping("/student/leave")
public class StudentReportController {

    @Resource
    private StudentLeaveReportService studentLeaveReportService;

    @GetMapping("/report")
    public CommonResult studentReport(String applyNo) {
        String message = studentLeaveReportService.createLeaveReport(applyNo);
        return CommonResult.success(null,message);
    }
}
